package org.hawk.gwtppc.webtest.common;

import java.util.Arrays;
import java.util.List;

import org.hawk.gwtppc.webtest.tests.ClassSuite;
import org.hawk.gwtppc.webtest.tests.ConstructorSuite;
import org.hawk.gwtppc.webtest.tests.FieldSuite;
import org.hawk.gwtppc.webtest.tests.MethodSuite;
import org.hawk.gwtppc.webtest.tests.MiscSuite;

import com.google.gwt.core.client.EntryPoint;

/**
 * Entry point for native javascript testcases.
 * 
 * @author alex.bereznevatiy@gmail.com
 */
public class Launcher implements EntryPoint {
	private static final List<TestSuite> suites = Arrays.asList(new TestSuite[] {
			new ClassSuite(), new MethodSuite(), new ConstructorSuite(), new FieldSuite(), new MiscSuite()
	});
	/*
	 * (non-Javadoc)
	 * @see com.google.gwt.core.client.EntryPoint#onModuleLoad()
	 */
	public void onModuleLoad() {
		Report report = new Report();
		
		for (TestSuite suite : suites) {
			suite.run(report);
		}
		
		report.print();
	}
}
